package com.situ.cart.api.service;

import com.mall.common.util.JsonResult;
import com.mall.model.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "mall-gateway",contextId = "product-feign")
@Component
public interface ProductFeignService {
    @GetMapping("/api/products/{id}")
    ResponseEntity<JsonResult<Product>> findById(@PathVariable("id") Integer id);
}